#!/bin/sh

set -e

# launch agrego at startup
update-rc.d agrego-@@ENDPOINT@@ defaults

# add a default instance
# TODO do next line only if it's and install not reinstall or update
INSTANCES=`agrego-manage-@@ENDPOINT@@.sh list`
if [ ! "$INSTANCES" ]
then
	agrego-manage-@@ENDPOINT@@.sh --force --quiet add default
fi
